import request from '../utils/request.js';


export const getCtgsApi = () => request.get('/ctgs/records');


export const getAreasApi = () => request.get('/areas/records');

export const getPostsApi = (params) => request.get('/posts/records', {
	sort: '-created',
	perPage: 2,
	...params
});


export const getPostsByIdApi = (id, params) => request.get(`/posts/records/${id}`, {
	expand: 'recommend,ctg',
	...params,
});